package operation;

import book.Book;
import book.BookList;
import jdk.swing.interop.SwingInterOpUtils;

public class Showbook implements Operate {
    @Override
    public void work(BookList books) {
        System.out.println("显示书籍....");
        int count=books.getUsedbooks();
        for(int i=0;i<count;i++) {
            //通过循环遍历数组;调用books.getbook(i)方法获取指定的书籍对象
            System.out.println(books.getbook(i).toString());
        }
        System.out.println();
    }
}
